# list = []
# for num in range(10):
#     if num % 2 == 0:
#         list.append(num)
#
# print(list)

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
list1 = [1, 12, 124, 'dfh', 'adf']
list2 = ['adhe', 'ahera', 24, 62]
list1.append(list2)
print(list1)
for i in list1:
    if (isinstance(i,list)):
        for j in i:
            print(j,end=',')
    else:
        print(i)

print()
print('-'*20)

#
li = [12,23,34,45]
num = 120
li.append(num)
print(li)

print('-'*20)
list11 = ['ab','bc','cd','de']
list22 = ['gg','jj','mm']
list11.extend(list22)
print(list11)
list11.extend('abcdefgh')
print(list11)

print('-'*20)
list11 = ['ab','bc','cd','de']
list22 = ['11','22','33']
print(list11)
# list11.insert(len(list11),'ef')
list11.insert(len(list11)-1,'ef')
print(list11)